package com.linwancun.lwcyback.service;

import com.linwancun.lwcyback.mapper.HuatiMapper;
import com.linwancun.lwcyback.model.Huati;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HuatiServiceImp implements HuatiService {
    @Resource
    private HuatiMapper huatiMapper;

    @Override
    public void insert(Huati object) {
        huatiMapper.insert(object);
    }

    @Override
    public void save(Huati object) {
        huatiMapper.updateByPrimaryKey(object);
    }

    @Override
    public List<Huati> getAll() {
        return huatiMapper.list(new Huati());
    }

    @Override
    public Huati find(Huati object) {
        return huatiMapper.find(object);
    }

    @Override
    public void delete(Huati object) {
        huatiMapper.deleteByPrimaryKey(object.getHuatiid());
    }

    @Override
    public List<Huati> getList(Huati object) {
        return huatiMapper.list(object);
    }
}
